package com.hzit.entity;

import lombok.*;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Data
// 	@Getter @Setter
@AllArgsConstructor
@NoArgsConstructor
@Component
public class Student {
	private Integer sid;
	private String sname;
	private String sex;
	private Integer age;
	private String addr;

	// bean初始化时的注解
	@PostConstruct
	public void init(){
		System.out.println("student初始化。");
	}
	// bean销毁时的注解
	@PreDestroy
	public void destroy(){
		System.out.println("student销毁.");
	}
}

